//
//  ViewController.m
//  TestDemo
//
//  Created by qianfeng on 15-6-30.
//  Copyright (c) 2015年 JP. All rights reserved.
//

#import "ViewController.h"
#define kUrl @"http://news-at.zhihu.com/api/4/story/4834491"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    NSString *path = @"http://news-at.zhihu.com/api/4/stories/latest?client=0";
    
    NSString *path1 = @"http://news-at.zhihu.com/api/4/stories/before/20150628?client=0";
    
    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
   // manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    [manager GET:path1 parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSLog(@"%@", [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding]);
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"%@",error.localizedDescription);
    }];

}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
